<template>
  <van-swipe class="my-swipe" :autoplay="5000" indicator-color="#1baeae">
    <van-swipe-item v-for="(item, index) in props.list" :key="index">
      <img :src="item.carouselUrl" @click="goto(item.redirectUrl)" />
    </van-swipe-item>
  </van-swipe>
</template>
<script lang="ts" setup>
const props = defineProps({
  list: {
    type: Array,
    default() {
      return [];
    },
  },
});
const goto = (url: string) => {
  window.open(url);
};
</script>
<style lang="less" scoped>
.my-swipe .van-swipe-item {
  img {
    width: 100%;
    height: 100%;
  }
  margin-top: 50px;
}
</style>
